import Vue from 'vue'
import App from './App'
import { Http } from '@/common/js/http.js'
import { Config } from '@/common/js/config.js'
import common from '@/common/js/common.js'

import {router, RouterMount} from '@/common/js/router.js'
Vue.use(router)

// #ifdef H5 
import wxapi from '@/common/js/wxapi.js'
Vue.prototype.$wxapi = wxapi;

import h5share from '@/common/js/h5share.js'
Vue.mixin(h5share)
// #endif

// #ifdef MP-WEIXIN
import share from '@/common/js/share.js'
Vue.mixin(share)
// #endif

Vue.config.productionTip = false
Vue.prototype.$Http = Http
Vue.prototype.$Config = Config
Vue.prototype.$base = common

App.mpType = 'app'

const app = new Vue({
	...App
})

//v1.3.5起 H5端 你应该去除原有的app.$mount();使用路由自带的渲染方式
// #ifdef H5
	RouterMount(app,router,'#app')
// #endif

// #ifndef H5
	app.$mount(); //为了兼容小程序及app端必须这样写才有效果
// #endif
